package login;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class loginMapper extends Mapper<LongWritable, Text,MemberDate,LongWritable> {
    @Override
    protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, MemberDate, LongWritable>.Context context) throws IOException, InterruptedException {
        //value ="Nehrn,2016-01-01"
        String line =value.toString();
        String[] words=line.split(",");

        MemberDate m = new MemberDate(words[0],words[1]);
        context.write(m,new LongWritable(1));

    }
}
